fix(libs): make the type-tests targets runnable again - #1064
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
blove
enabled auto-merge (squash)
September 8, 2026 15:01
blove
force-pushed
the
blove/small-followups
branch
from
September 8, 2026 15:52
5867577 to
ee72afe
Compare
Contributor
blove
force-pushed
the
blove/small-followups
branch
from
September 8, 2026 16:08
ee72afe to
f82e0be
Compare
Contributor
All three failed on main for two inherited reasons: TS 6 errors on the baseUrl deprecation from tsconfig.base.json, and the per-library rootDir excludes the sibling sources that type-specs import through path mappings. Both are scoped to the type-tests configs — putting ignoreDeprecations in tsconfig.base.json breaks the library builds, whose compiler rejects the option with TS5103. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove
force-pushed
the
blove/small-followups
branch
from
September 8, 2026 16:55
f82e0be to
c8d8f5e
Compare
Contributor
blove
added a commit
that referenced
this pull request
Sep 8, 2026
The three `type-tests` targets invoked `npx tsc`, which does not resolve to the workspace compiler. `@dawn-ai/core` pulls in `@typescript/old` (npm:typescript@6.0.2), whose `tsc` bin wins the hoist at `node_modules/.bin/tsc`, so those targets type-checked the public API with TypeScript 6.0.2 while every other target compiles with the declared 5.9.3. That mismatch is what produced the TS5101 `baseUrl` deprecation error, which #1064 silenced with `ignoreDeprecations: "6.0"`. Invoke `node ./node_modules/typescript/bin/tsc` so the targets use the compiler the workspace declares, and drop the `ignoreDeprecations` holding action. The `rootDir` lines stay: they solve the unrelated problem of type-specs importing sibling libraries through path mappings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove
added a commit
that referenced
this pull request
Sep 8, 2026
The three `type-tests` targets invoked `npx tsc`, which does not resolve to the workspace compiler. `@dawn-ai/core` pulls in `@typescript/old` (npm:typescript@6.0.2), whose `tsc` bin wins the hoist at `node_modules/.bin/tsc`, so those targets type-checked the public API with TypeScript 6.0.2 while every other target compiles with the declared 5.9.3. That mismatch is what produced the TS5101 `baseUrl` deprecation error, which #1064 silenced with `ignoreDeprecations: "6.0"`. Invoke `node ./node_modules/typescript/bin/tsc` so the targets use the compiler the workspace declares, and drop the `ignoreDeprecations` holding action. The `rootDir` lines stay: they solve the unrelated problem of type-specs importing sibling libraries through path mappings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove
added a commit
that referenced
this pull request
Sep 8, 2026
… blocker (#1066) * fix(libs): run the type-tests targets on the workspace TypeScript The three `type-tests` targets invoked `npx tsc`, which does not resolve to the workspace compiler. `@dawn-ai/core` pulls in `@typescript/old` (npm:typescript@6.0.2), whose `tsc` bin wins the hoist at `node_modules/.bin/tsc`, so those targets type-checked the public API with TypeScript 6.0.2 while every other target compiles with the declared 5.9.3. That mismatch is what produced the TS5101 `baseUrl` deprecation error, which #1064 silenced with `ignoreDeprecations: "6.0"`. Invoke `node ./node_modules/typescript/bin/tsc` so the targets use the compiler the workspace declares, and drop the `ignoreDeprecations` holding action. The `rootDir` lines stay: they solve the unrelated problem of type-specs importing sibling libraries through path mappings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs(workspace): record why tsconfig baseUrl cannot be dropped yet TypeScript 7 removes `baseUrl`, and since TypeScript 5.0 the `paths` map no longer needs it. Removing it from `tsconfig.base.json` nonetheless breaks every library that depends on another library: Nx's buildable-library executors write a generated tsconfig under `tmp/<projectRoot>/build/` whose `paths` re-declare dependency entries as workspace-root-relative dist outputs (`dist/libs/telemetry/browser`). Without a `baseUrl` those non-relative values raise TS5090 and TypeScript discards the whole `paths` map, so `render:build` and `cockpit-shell:build` fail to resolve `@threadplane/telemetry/browser` and `@threadplane/cockpit-registry`. Leave the option in place and record the blocker next to it so the next attempt starts from the Nx side rather than re-deriving this. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All three
type-teststargets (chat,ag-ui,langgraph) have been failing on main, so the type-level assertions they exist to enforce were not being checked. Three separate agents hit this last week and had to verify their type assertions by hand.Two inherited causes, both fixed only inside the type-tests configs:
TS5101—tsconfig.base.jsonsetsbaseUrl, which TypeScript 6 reports as deprecated. These targets invoke the workspacetsc(6.0.2), newer than the compilers the library builds use. PuttingignoreDeprecationsintsconfig.base.jsoninstead breaks every library build withTS5103: Invalid value for '--ignoreDeprecations', so it is scoped to the three configs that need it.TS6059— each library'srootDiris its own directory, but type-specs import sibling libraries throughtsconfigpath mappings. WithnoEmit,rootDironly has to be wide enough to contain what is checked.Dropping
baseUrlaltogether is the real migration before TypeScript 7, but it changes resolution for every project in the workspace and does not belong in this fix.Verification:
chat:type-tests,ag-ui:type-tests,langgraph:type-testsall exit 0 (each failed before);nx run-many -t build,lint --projects=chat,ag-ui,langgraph,rendergreen.🤖 Generated with Claude Code